#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int* twoSum(int* nums, int numsSize, int target, int* returnSize) {
    int i, j;
    static int result[2];
    for (i = 0; i < numsSize; i++)
    {
        for (j = i+1; j < numsSize; j++)
        {
            if (nums[i] + nums[j] == target)
            {
                result[0] = i;
                result[1] = j;
                *returnSize = 2;
                return result;
            }
        }
    }
    *returnSize = 0;
    return NULL;
}
int main()
{
    int nums[] = { 3,3,4,15 };
    int nsz = sizeof(nums) / sizeof(nums[0]);
    int target = 6;
    int returnSize;
    int *result=twoSum(nums, nsz, target, &returnSize);
    if (returnSize == 2)
    {
        printf("%d %d", result[0], result[1]);
    }
    return 0;
}